package com.strato.base.osgi.v1_0_0;

import java.util.Comparator;

public interface Ordered {

	public int getOrder();
	
	public static Comparator<Ordered> ASCEND = new Comparator<Ordered>(){
		@Override
		public int compare(Ordered arg0, Ordered arg1) {
			return arg0.getOrder()-arg1.getOrder();
		}
	};

	public static Comparator<Ordered> DECEND = new Comparator<Ordered>(){
		@Override
		public int compare(Ordered arg0, Ordered arg1) {
			return arg1.getOrder()-arg0.getOrder();
		}
	};
}
